import request from '@/utils/request'

// 查询咨询栏目列表
export function listSubject(query) {
  return request({
    url: '/consultation/subject/list',
    method: 'get',
    params: query
  })
}
// 查询部门列表（排除节点）
export function listExcludeChild(subjectId) {
  return request({
    url: '/consultation/subject/list/exclude/' + subjectId,
    method: 'get'
  })
}

// 查询咨询栏目详细
export function getSubject(subjectId) {
  return request({
    url: '/consultation/subject/' + subjectId,
    method: 'get'
  })
}

// 新增咨询栏目
export function addSubject(data) {
  return request({
    url: '/consultation/subject',
    method: 'post',
    data: data
  })
}

// 修改咨询栏目
export function updateSubject(data) {
  return request({
    url: '/consultation/subject',
    method: 'put',
    data: data
  })
}

// 删除咨询栏目
export function delSubject(subjectId) {
  return request({
    url: '/consultation/subject/' + subjectId,
    method: 'delete'
  })
}

// 导出咨询栏目
export function exportSubject(query) {
  return request({
    url: '/consultation/subject/export',
    method: 'get',
    params: query
  })
}